package org.flycloud.web.platform.api;

import java.util.List;

import org.flycloud.web.decoupling.annotation.RemoteController;
import org.flycloud.web.decoupling.annotation.ReturnList;
import org.flycloud.web.platform.entity.Menu;
import org.flycloud.web.sso.common.Token;
import org.flycloud.web.sso.common.UserSession;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.SessionAttribute;

@RemoteController("controller.platform")
public interface IPlatformController {

	@RequestMapping("/menutree")
	@ReturnList(Menu.class)
	public List<Menu> menuTree(@SessionAttribute(Token.TOKEN) String token);

	@RequestMapping("/login")
	public UserSession login(@RequestParam("username") String username, @RequestParam("password") String password);

}
